<template>
  <div>
    <div class="dis_top">检查项目结果状态列表</div>
    <div class="back"></div>
    <div class="dis_flex" ref="minibox">
      <div class="flex_l">
        <div class="l_right">
          <div v-for="(item,index) in checklist" :key="index" class="list_ch">
            <div style="margin-bottom: 15px" @click="goAssignBlock('block'+ index,100)">
              <el-checkbox label="" v-model="item.status" :checked="item.checkStatus===1" :disabled="true"></el-checkbox>
              <span style="margin-left: 5px">{{ item.itemName }}</span>
            </div>
          </div>
        </div>
      </div>
      <div class="flex_r">
        <!-- 右侧标签页 -->
        <div>
          <div class="r_box">
            <div style="height:90px"></div>
            <div class="r_box_top">
              <el-form :inline="true" ref="ruleFormed" class="" label-position="left">
                <!-- <el-form-item label="体检编号" prop="name">
                  {{ordersId}}
                </el-form-item> -->
                <el-form-item label="体检编号" >{{ peOrdersMain.orderNo }}</el-form-item>
                <el-form-item label="姓名:"  style="margin-left:40px">{{ peOrdersMain.customerName }}</el-form-item>
                <el-form-item label="性别:"  style="margin-left:40px">{{ peOrdersMain.sex==1?"男":"女"}}</el-form-item>
                <el-form-item label="年龄:"  style="margin-left:40px">{{ peOrdersMain.age }}</el-form-item>
                <el-form-item label="合同名称:"  style="margin-left:40px">{{ peOrdersMain.contractName }}</el-form-item>
              </el-form>
            </div>
            <el-form ref="form" :model="peOrdersDetail" label-width="0px" label-position="left">
              <div v-for="(item,index) in peOrdersDetailsList" style="border: 1px solid #efefef; margin-bottom: 25px" :key="index" :ref="'block'+index">
                <div class="table-head bj_doctor">
                  <el-form :inline="true" ref="ruleFormed" :model="item.examRecord">
                    <el-form-item label="体检科室">
                      <span>{{ item.deptName }}</span>
                    </el-form-item>
                    <!-- <el-form-item label="检查医师" style="margin-left:40px">
                      <el-select v-model="item.examRecord.doctorName">
                        <el-option v-for="(d,i) in item.doctors" :key="i" :label="d.personName" :value="d.personName"></el-option>
                      </el-select>
                    </el-form-item> -->
                    <el-form-item label="检查日期" style="margin-left:40px">
                      <el-date-picker
                          v-model="item.examRecord.editTime"
                          type="datetime"
                          value-format="yyyy-MM-dd HH:mm:ss">
                      </el-date-picker>
                    </el-form-item>
                    <!-- <el-form-item label="未检：">
                      <el-checkbox v-model="item.examRecord.checkStatus===1"></el-checkbox>
                    </el-form-item> -->
                  </el-form>
                </div>
                <el-table
                    header-row-class-name="header_row_style"
                    :data="item.examItemContentDetails"
                    style="width: 100%"
                >
                  <el-table-column
                      label="检查项目"
                      prop="itemName"
                      show-overflow-tooltip
                      width="150">
                    <template slot-scope="scope">
                      <span>{{ scope.$index==0?item.itemName:"" }}</span>
                    </template>
                  </el-table-column>
                  <el-table-column
                      label="检查内容"
                      prop="contentName"
                      width="120"
                  >
                  </el-table-column>
                  <el-table-column label="检查结果" width="400">
                    <template slot-scope="scope">
                      <div class="butt">
                        <el-button @click="toMore(scope.row,index,scope.$index,0)" size="mini" style="margin-right: 10px;">更多</el-button>
                        <div style="display: inline-block">
                          <!-- <el-form-item :prop="'item.examItemContentDetails.'+scope.$index+'.resultValue'"> -->
                            <el-input
                            type="textarea"
                                v-model.trim="scope.row.examContentsResult.resultValue"
                                size="mini"
                                placeholder="请填写值"
                                style="width: 290px;"
                                :autosize="{ minRows: 3}"
                                ></el-input>
                          <!-- </el-form-item> -->
                        </div>
                      </div>
                    </template>
                  </el-table-column>
                  <el-table-column
                      label="单位"
                      prop="units"
                      show-overflow-tooltip
                      width="80">
                  </el-table-column>
                  <el-table-column label="趋势" width="120">
                    <template slot-scope="scope">
                      <el-select v-model="scope.row.examContentsResult.trend" placeholder="--" size="small" v-if="scope.row.trendDisplaychar!=null">
                        <el-option v-for="(item,index) in scope.row.trendDisplaychar" :label="item" :value="item"
                                    :key="index"></el-option>
                      </el-select>
                      <el-select v-model="scope.row.examContentsResult.trend" placeholder="--" size="small" v-else>
                        <el-option v-for="(item,index) in trendOptions" :label="item.label" :value="item.value"
                                    :key="index"></el-option>
                      </el-select>
                    </template>
                  </el-table-column>
                  <el-table-column label="参考范围" prop="normalDisplaychar">
                    <template slot-scope="scope">
                      <span>{{ scope.row.minLimit }}——{{ scope.row.maxLimit }}</span>
                    </template>
                  </el-table-column>
                </el-table>
                <!-- 检查结果 -->
                <div class="r_box_con_res">
                  <el-button style="margin:0 0 10px 180px" @click="toMore(item,index,0,1)">添加小结</el-button>
                  <el-form-item label="科室小结" prop="desc" label-width="180px">
                    <el-input type="textarea"
												v-model="item.diagnosisResult"
												:autosize="{ minRows: 5}"
												class="textarea">
                      <template>
                        <p v-for="(i, v) in resultArr" :key="v">{{ i }}.{{ v }}</p>
                      </template>
                    </el-input>
                  </el-form-item>
                  <!-- <div class="bottons"> -->
                    <!-- <el-checkbox v-model="item.box" true-label="1" false-label="0">未检</el-checkbox> -->
                    <!-- <el-button type="primary" @click="saveRecord(index)" class="save">保存</el-button> -->
                    <!-- <el-button type="primary" @click="go(index)">返回</el-button>  -->
                  <!-- </div> -->
                </div>
                <div class="checkName">
                  <el-form-item label="检查医师" style="margin-left:80px" label-width="100px" >
                    <el-select v-model="item.examRecord.doctorName">
                      <el-option v-for="(d,i) in item.doctors" :key="i" :label="d.personName" :value="d.personName"></el-option>
                    </el-select>
                  </el-form-item>
                  <el-form-item label="已检" label-width="50px" style="margin-left:200px">
                      <el-checkbox v-model="item.examRecord.checkStatus" :false-label="5" :true-label="1"></el-checkbox>
                  </el-form-item>
                </div>
              </div>
              <div class="bottons">
                <el-button class="buttons" type="success" @click="submit()" v-if="peOrdersMain.status<10">提交</el-button>
                <el-button class="buttons" @click="huitui()">返回</el-button>
              </div>

            </el-form>
            <!-- 异常结果 -->
            <el-dialog :title="sizeshow=='1'?'选择科室小结':'选择异常检查结果'" :visible.sync="moreVisible">
              <el-form ref="form" :model="moreList" label-width="0px" label-position="left">
                <el-table
                    ref="multipleTable"
                    header-row-class-name="header_row_style"
                    :data="moreList.records"
                    @selection-change="handleSelectionChange">
                  <el-table-column type="selection" width="55"></el-table-column>
                  <el-table-column :label="sizeshow=='1'?'诊断结论':'体检结果'" prop="title">
                    <template slot-scope="scope" >
                      <!-- <div v-html="scope.row.contentOptions"></div> -->
                      <!-- <span>{{scope.row.contentOptions}}</span> -->
                      <div style="display:flex">
                        <div v-for="(ckitem,ckindex) in scope.row.checkslist" :key="ckindex" style="margin-right:10px">
                          <span v-if="typeof(ckitem)=='string'">{{ckitem}}</span>
                          <span v-else style="display:flex" class="checklist">
                            <span class="boxcheck">[</span>
                             <el-checkbox-group v-model="scope.row.checks[ckindex]">
                                <el-checkbox :label="itemck" v-for="(itemck,indexck) in ckitem" :key="indexck"></el-checkbox>
                              </el-checkbox-group>
                              <span class="boxcheck">]</span>
                          </span>
                        </div>
                      </div>
                    </template>
                  </el-table-column>
                  <!-- <el-table-column label="科室小结" width="100">
                    <template slot-scope="scope">
                      <el-form-item :prop="'records.' + scope.$index + '.selections'" >
                        <el-checkbox
                            v-model="scope.row.selections"
                            size="mini"
                            true-label="1"
                            false-label="0"
                        >
                        </el-checkbox>
                      </el-form-item>
                    </template>
                  </el-table-column> -->
                </el-table>
              </el-form>
              <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="toResultArr">确定</el-button>
              </div>
            </el-dialog>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts">
export default {
  data() {
    return {
      vaule1: "",
      resultArr: [],
      moreVisible: false,
      moreList: {},
      trendOptions: [
        {label: "↑", value: 1},
        {label: "↓", value: 2},
        {label: "--", value: 3},
      ],
      toMoreItemIndex: 0,
      toMoreItemRecordIndex: 0,
      multipleTablelist: [],
      deptName: "",
      ordersId: '',
      userName: '',
      userId: '',
      peOrdersDetailsList: [],
      orderDict:{},
      checklist: [],
      peOrdersDetail: {},
      peOrdersMain: {},
      examItemContentDetails: [],
      formInline: {
        region: '',
        user: '',
      },
      deptIds: [],
      form: {
        diagnosisResult: ""
      },
      resultDict: [],
      // 页码
      pageSize: 10,
      pageNo: 1,
      total: 0,
      checkStatu:[],
      orderId:'',
      sizeshow:2
    }
  },
  created() {
    this.getPeExamRecordDetail()
    this.ordersId = this.$route.query.ordersId
  },
  methods: {
    huitui() {
      this.$router.go(-1)
    },
    getPeExamRecordDetail() {
      this.$axios.getPeOrdersAllDetails({
        orderNo: this.$route.query.ordersId,
      }).then(res => {
        if (res.code === "00000") {
          this.peOrdersMain = res.data.peOrdersMain
          this.orderId = res.data.peOrdersMain.orderId
          var peOrdersDetailsList = res.data.peOrdersDetailsList
          peOrdersDetailsList.forEach(v=>{
            this.orderDict[v.itemId] = v
            // 设置默认时间
            if(v.examRecord.editTime==null||v.examRecord.editTime==""){
              this.$set(v.examRecord,"editTime",new Date())
            }
            v.examItemContentDetails.forEach((it,ix)=>{
              if(it.trendDisplaychar!=null){
                v.examItemContentDetails[ix].trendDisplaychar = v.examItemContentDetails[ix].trendDisplaychar.split("|")
              }
            })
            v.box = 0
            // 左侧列表
            this.checklist.push({
              itemId:v.itemId,
              itemName:v.itemName,
              checkStatus:v.checkStatus
            })
          })
          this.peOrdersDetailsList = peOrdersDetailsList
          this.getDeptDoctors(peOrdersDetailsList)
        }
      })
    },
    getDeptDoctors(peOrdersDetailsList) {
      peOrdersDetailsList.forEach((item,index) => {
        if (item.examRecord.deptId) {
          this.deptIds.push(item.examRecord.deptId)
        }
      })
      if (this.deptIds.length > 0) {
        this.$axios.queryPbPersonsList({
          deptIds: this.deptIds,
          pageSize:100
        }).then(res => {
          if (res.code === "00000") {
            const doctors = res.data.records;
            peOrdersDetailsList.forEach(v1 => {
              var num = []
              const deptId = v1.examRecord.deptId
              doctors.forEach(v2 => {
                if (deptId == v2.deptId) {
                  num.push({"personName": v2.personName})
                }
              })
              this.$set(v1,"doctors",num)
            })
            this.peOrdersDetailsList = peOrdersDetailsList
          }
        })
      }
    },
    saveRecord(index){
      let peOrdersDetail2 = JSON.parse(JSON.stringify(this.peOrdersDetailsList[index]))
      peOrdersDetail2.peExamContentsResultsList = peOrdersDetail2.examItemContentDetails
      peOrdersDetail2.doctorName = peOrdersDetail2.examRecord.doctorName
      delete peOrdersDetail2.examItemContentDetails
      delete peOrdersDetail2.examRecord
      delete peOrdersDetail2.doctors
      if(peOrdersDetail2.box==1){
        peOrdersDetail2.checkStatu = 0
      }else{
        peOrdersDetail2.checkStatu = 1
      }
      delete peOrdersDetail2.box
      peOrdersDetail2.peExamContentsResultsList.forEach((item, index) => {
        peOrdersDetail2.peExamContentsResultsList[index] = peOrdersDetail2.peExamContentsResultsList[index].examContentsResult
      });
      if(peOrdersDetail2.peExamContentsResultsList[0]){
        peOrdersDetail2.id = peOrdersDetail2.peExamContentsResultsList[0].recordId
      }
      this.$axios.insertPeExamRecord(peOrdersDetail2).then(res=>{
        if(res.code === "00000"){
          this.$message({
            type:'success',
            message:res.msg
          })
        }
      })
    },
    submit() {
      this.$confirm("是否确认提交, 是否继续?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      }).then(()=>{
        this.peOrdersDetailsList.forEach(res=>{
          res.examRecord.diagnosisResult =  res.diagnosisResult
          if(res.doctors){
            delete res.doctors
          }
          res.examItemContentDetails.forEach(v=>{
            delete v.trendDisplaychar
          })
        })
        this.$axios.updatePeOrdersAllDetails({
          ordersId: this.orderId,
          peOrdersDetailsList: this.peOrdersDetailsList
        }).then(res => {
          if (res.code === "00000") {
            this.$message({
              type: 'success',
              message: res.msg
            })
            this.huitui()
          }
        })
      })

    },
    // saveReport() {
    //   var req = {
    //     diagnosisResult: this.peOrdersDetail.diagnosisResult,
    //     orderId: "",
    //     itemId: ""
    //   }
    // },
    toMore(row, itemIndex, recordIndex,sizeshow) {
      // 当前弹框状态
      this.moreVisible = true
      // 获取需要存储的位置
      this.sizeshow = sizeshow
      this.toMoreItemIndex = itemIndex
      this.toMoreItemRecordIndex = recordIndex
      // this.$axios.queryDiagnosticResultOptions({
      if(this.sizeshow == 0){
          this.$axios.queryDiagnosticResultOptions({
          itemId : row.itemId,
          contentId : row.id
        }).then(res => {
        if (res.code === "00000") {
          // this.moreList = res.data
          this.$set(this.moreList, 'records', res.data )
          this.moreList.records.forEach(res=>{
            // this.$set(res, 'selections', "0")
            var num = 0
            var index = res.exceptionName.indexOf('[')
            while(index!==-1){
              num++;
              index = res.exceptionName.indexOf('[',index+1)
            }
            var checks = []
            var checkslist = []
            let txt = res.exceptionName
            txt = res.exceptionName.replaceAll("[","-")
            txt = txt.replaceAll("]","-")
            checks = txt.split("-")
            // console.log(checks);
            if(num>=1){
              var nums = 1
              for(let i=0;i<num;i++){
                checks[nums] = checks[nums].split("|")
                nums=nums+2
              }
            }
            checkslist = JSON.parse(JSON.stringify(checks))
            if(num>=1){
              var nums = 1
              for(let i=0;i<num;i++){
                checks[nums] = []
                nums=nums+2
              }
            }
            this.$set(res, 'checks', checks )
            this.$set(res, 'checkslist', checkslist )
          })
        }
      })
      }else{
        // 小节
        this.$axios.queryResultPage({
          itemId : row.itemId
        }).then(res => {
          if (res.code === "00000") {
            this.moreList = res.data
            this.moreList.records.forEach(res2 => {
              var num = 0
              var index = res2.entryContent.indexOf('[')
              while(index!==-1){
                num++;
                index = res2.entryContent.indexOf('[',index+1)
              }
              var checks = []
              var checkslist = []
              let txt = res2.entryContent
              txt = res2.entryContent.replaceAll("[","-")
              txt = txt.replaceAll("]","-")
              checks = txt.split("-")
              if(num>=1){
                var nums = 1
                for(let i=0;i<num;i++){
                  checks[nums] = checks[nums].split("|")
                  nums=nums+2
                }
              }
              checkslist = JSON.parse(JSON.stringify(checks))
              if(num>=1){
                var nums = 1
                for(let i=0;i<num;i++){
                  checks[nums] = []
                  nums=nums+2
                }
              }
              this.$set(res2, 'checks', checks )
              this.$set(res2, 'checkslist', checkslist )
            })
          }
        })
      }
    },
    handleSelectionChange(val) {
      console.log(val)
      // this.multipleTablelist = val;
    },
    toResultArr() {
      // 这里的 multipleTable 是上面ref的值。 直接访问子组件实例上的属性。
      // if(this.$refs.multipleTable.selection.length>1){
      //   this.$message({
      //       type: 'warning',
      //       message: "只能够选择一条记录"
      //     })
      // }else
      if(this.$refs.multipleTable.selection.length==0){
        this.$message({
            type: 'warning',
            message: "请选择一条记录进行使用"
          })
      }else{
        this.moreVisible = false
        let stringList = ""
        if(this.$refs.multipleTable.selection.length>1){
          this.$refs.multipleTable.selection.forEach((element,index) => {
            if(index==0){
              stringList = element.checks.join("")
            }else{
              stringList += ","+ element.checks.join("")
            }
          });
        }else{
          stringList = this.$refs.multipleTable.selection[0].checks.join("")
        }
        if(this.sizeshow==0){
          // this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue = this.$refs.multipleTable.selection[0].checks.join("")
          // this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue = stringList
          if(this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue!=""&&this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue!=null){
            let text = this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue + "," + stringList
            this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue = text
          }else{
            this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].examContentsResult.resultValue = stringList
          }
        }else{
          if(this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult!=""&&this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult!=null){
            // let text =this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult+","+ this.$refs.multipleTable.selection[0].checks.join("")
            let text =this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult+","+ stringList
            this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult = text
          }else{
            // this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult = this.$refs.multipleTable.selection[0].checks.join("")
            this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult = stringList
        }
        }
      }
      // console.log(this.$refs.multipleTable.selection);
      // this.resultArr[this.toMoreItemRecordIndex] = []
      // this.moreList.map((item) => {
      //   if (item.toResult) {
      //     this.resultArr[this.toMoreItemRecordIndex].push(item)
      //   }
      // })
      // this.resultArr.forEach((a, i) => {
      //   a.forEach((b, j) => {
      //     if (this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult === null) {
      //       this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult = `${i + 1}.${j + 1}: ${b.exceptionName};`
      //     } else {
      //       this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult += `${i + 1}.${j + 1}: ${b.exceptionName}`
      //     }
      //   })
      //   this.peOrdersDetailsList[this.toMoreItemIndex].diagnosisResult += "。   "
      // })
      // var rowRes = []
      // this.multipleTablelist.map(item => {
      //   rowRes.push(item.exceptionName)
      // })
      // this.peOrdersDetailsList[this.toMoreItemIndex].examItemContentDetails[this.toMoreItemRecordIndex].resultValue = rowRes.toString()

    },
    go(index){
      console.log(index);
    },
    goAssignBlock(el, speed) {
      let _this = this;
      let windowH = window.innerHeight; //浏览器窗口高度
      let h = this.$refs[el][0].offsetHeight; //模块内容高度
      let t = this.$refs[el][0].offsetTop; //模块相对于内容顶部的距离
      let top = t-100 ; //需要滚动到的位置，若改为 t 则滚动到模块顶部位置，此处是滚动到模块相对于窗口垂直居中的位置
      let scrollTop = this.$refs.minibox.scrollTop; //滚动条距离顶部高度
      let currentTop = scrollTop; //默认滚动位置为当前滚动条位置，若改为0，则每次都会从顶部滚动到指定位置
      let requestId;
      this.$refs.minibox.scrollTop = t-120
    }
  },
}
</script>
<style scoped>
::v-deep .el-textarea__inner{
  overflow-y: hidden;
}
.dis_top {
  position: absolute;
  z-index: 3;
  top: 0px;
  left: 0px;
  padding: 5px;
  display: flex;
  justify-content: space-between;
  color: #000000;
  font-weight: bold;
  width: calc(100% - 10px);
  background: #ffffff;
}

.dis_top > div {
  display: flex;
  align-items: center;
}

.dis_top > div > span {
  margin-left: 20px;
}

.dis_flex {
  display: flex;
  margin-top: 30px;
  height: 85vh;
  overflow-y: scroll;
  overflow-x:hidden;

}
.back{
  position: absolute;
  top: 20px;
  height: 20px;
  width: 100%;
  z-index: 2;
  background: #f0f0f0;
}
.flex_r>div{
  background-color: #ffffff;
}
.flex_l {
  width: 300px !important;
  flex-shrink: 0;
  margin-right: 10px;
  display: flex;
  flex-direction: column;
  /* background-color: #fff; */
  overflow: hidden;
}

.r_box {
  margin-left: 10px;
  /* margin-bottom: 20px; */
  width: 1300px;
  line-height: 25px;
  border: 1px solid #efefef;
  overflow: hidden;
}

.r_box_con {
  padding-left: 20px;
  padding-right: 20px;
}

.flies_box {
  margin-left: 20px;
  margin-bottom: 20px;
  width: 1300px;
  line-height: 25px;
}

.flies {
  margin-top: 15px;
}

.flies p {
  margin-bottom: 10px;
}

.r_box_con_title {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  border-bottom: 1px solid #333;
  font-size: 18px;
  line-height: 30px;
}

.r_box_con_bor {
  border-bottom: 1px solid #333;
  padding-bottom: 10px;
}

.r_box_con_box {
  margin-top: 10px;
  display: flex;
  align-items: center;
  font-size: 15px;
  line-height: 45px;
}

.r_box_con_sl1 {
  padding: 0px 5px;
  width: 20%;
}

.r_box_con_sl2 {
  padding: 0px 5px;
  width: 30%;
}

.r_box_con_sl3 {
  padding: 0px 5px;
  width: 10%;
}

.r_box_con_sl4 {
  padding: 0px 5px;
  width: 15%;
}

.r_box_con_sl5 {
  padding: 0px 5px;
  width: 15%;
}

.r_box_con_sl6 {
  padding: 0px 5px;
  width: 10%;
}

.r_box_con_res {
  margin-top: 20px;
}

.el-form--inline .el-form-item {
  margin: 0;
}

.textarea {
  width: 600px
}

.r_box_con_res /deep/ .el-form-item__label {
  font-size: 22px !important;
}

.r_box_con_bottom {
  margin-top: 20px;
  display: flex;
}

.r_box_con_bottom div {
  margin-right: 15px;
}

.l_left {
  color: #7F7F7F;
  font-weight: bold;
  height: 36px;
}

/* .list_ch {

} */
.r_box_top{
  width: 75%;
  max-width: 1258px;
  /* min-width: 1300px; */
  padding: 20px;
  position: absolute;
  top: 40px;
  background-color: #ffffff;
  z-index: 2;
}
.flex_r {
  background: #ffffff;
  /* overflow-y: scroll; */
}

.r_list {
  display: flex;
  justify-content: space-between;
  align-items: center;
  line-height: 30px;
  color: #666666;
}

.r_list:hover {
  color: #2F9688;
  font-weight: bold;
}

.l_right {
  width: 280px;
  background: #fff;
  height: 80%;
  padding: 10px;
  position: absolute;
  top: 40px;
}
.diagnose > div:first-child {
  display: flex;
}
.bj_doctor {
  background: #E5F6FE;
  padding: 20px;
}
.butt{
  display: flex;
  align-items:  center
}
.bottons{
  display: flex;
  justify-content:  center;
  align-items: center;
}
.bottons .el-checkbox{
  margin-left: 20px;
}
.buttons{
  padding: 10px 70px;
  margin-bottom: 30px;
}
.save{
  padding: 10px 30px;
  margin-left: 100px;
}
/* .ckbox{
  display: flex;
} */
.dis_flex /deep/.el-table td{
  padding: 0 !important;
}
.boxcheck{
  margin: 0 10px;
}
.checklist /deep/ .el-checkbox{
  margin-right: 10px;
}
.checkName{
  display: flex;
}
</style>
